<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="IDropInListItemRenderer,mx.controls.listClasses.IDropInListItemRenderer,listData" name="keywords">
<title>mx.controls.listClasses.IDropInListItemRenderer</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'IDropInListItemRenderer - Zentrum virtUOS: virtPresenter';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">virtPresenter AsDoc</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?mx/controls/listClasses/IDropInListItemRenderer.html&amp;mx/controls/listClasses/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Interface&nbsp;IDropInListItemRenderer</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Interface IDropInListItemRenderer"); titleBar_setSubNav(false,true,false,false,false,false,false,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">mx.controls.listClasses</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Interface</td><td class="classSignature">public interface IDropInListItemRenderer</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Implementors</td><td><a href="../../controls/Button.html">Button</a>, <a href="../../controls/Image.html">Image</a>, <a href="../../controls/Label.html">Label</a>, <a href="../listClasses/ListBase.html">ListBase</a>, <a href="../listClasses/ListItemRenderer.html">ListItemRenderer</a>, <a href="../../controls/TextInput.html">TextInput</a>, <a href="../listClasses/TileListItemRenderer.html">TileListItemRenderer</a>, <a href="../treeClasses/TreeItemRenderer.html">TreeItemRenderer</a></td>
</tr>
</table>
<p></p>
  The interface for "drop-in" item renderers.  Most IListItemRenderers
  are not "drop-ins".  They are expecting to use a particular field of
  the data provider item.  For example, they may assign the "lastName"
  property of the item to a Label's <code>text</code> property.  This
  is easy to write using data-binding, but has the negative 
  consequence that the renderer cannot be re-used in another column
  of a DataGrid or another List with different fields.
  IDropInListItemRenderer allows a renderer to be re-used.  The list
  classes will pass more information to the renderer so that it
  can determine which field to use at run-time.
   <p>Components that you want to use as drop-in item renderers or drop-in
  item editors  must implement the IDropInListItemRenderer interface. 
  Many Flex component implement this interface, and therefore are usable
  as drop-in item renderers and drop-in item editors in any column or
  list.</p>
   <p>Drop-in item renderers or drop-in item editors also must implement
  the IDataRenderer interface to define the <code>data</code> property.</p> 
   <p>When a component is used as a drop-in item renderer or drop-in
  item editor, Flex initializes the <code>listData</code> property
  of the component with the appropriate data from the list control.
  The component can then use the <code>listData</code> property
  to initialize the <code>data</code> property of the drop-in
  item renderer or drop-in item editor.</p>
   <p>The <code>listData</code> property is of type BaseListData, 
  where the BaseListData class has four subclasses:
  DataGridListData, ListData, TreeListData, and MenuListData. 
  The actual data type of the value of the <code>listData</code> property 
  depends on the control using the drop-in item renderer or item editor. 
  For a DataGrid control, the value is of type DataGridListData, 
  for a List control the value is of type ListData,
  for a Tree control, the value is of type TreeListData, 
  and for a Menu control, the value is of type MenuListData..</p>
   <p>The following example shows the setter method for the
  <code>data</code> property for the NumericStepper control
  that initializes NumericStepper's <code>value</code> property
  based on the value of the <code>listData</code> property:</p>
   <pre>
    public function set data(value:Object):void
    {
      _data = value;
    
      this.value = _listData ? parseFloat(_listData.label) : Number(_data);
    
      dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
    }
  </pre>
   <p>In the example above, the NumericStepper control ignores the
  <code>data</code> property  when setting NumericStepper's
  <code>value</code> property, and uses the <code>listData</code>
  property instead.</p>
   <p>To implement the IDropInListItemRenderer interface,
  you define a setter and getter method to implement
  the <code>listData</code> property.
  Typically, the setter method writes the value of the
  <code>listData</code> property to an internal variable.
  The list class always assigns this property then sets
  the data provider item in the <code>data</code> property.</p>
   <p>Notice that the setter method for the <code>listData</code> property 
  does not dispatch an event. 
  This is because the list classes always set <code>listData</code>, 
  then set the <code>data</code> property. 
  Setting the <code>data</code> property also dispatches the <code>dataChange</code> event. 
  You never set <code>listData</code> on its own, 
  so it does not need to dispatch its own event. </p>
   <p>The <code>data</code> setter method could call the <code>invalidateProperties()</code> method 
  if it did something that required the control to update itself. 
  It would then be up to the component developer to write a <code>commitProperties()</code> method 
  to determine that <code>listData</code> was modified, and handle it accordingly. </p>
 
  <p>The getter method returns the current value
  of the internal variable,  as the following example shows:</p>
  
  <pre>
    // Internal variable for the property value.
    private var _listData:BaseListData;
    
    // Make the listData property bindable.
    [Bindable("dataChange")]
    
    // Define the getter method.
    public function get listData():BaseListData
    {
      return _listData;
    }
    
    // Define the setter method,
    public function set listData(value:BaseListData):void
    {
      _listData = value;
    }
  </pre>
   <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="../listClasses/BaseListData.html" target="">mx.controls.listClasses.BaseListData</a>
<br>
<a href="../../core/IDataRenderer.html" target="">mx.core.IDataRenderer</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#listData">listData</a> : <a href="../listClasses/BaseListData.html">BaseListData</a>
<div class="summaryTableDescription">
      Implements the <code>listData</code> property
      using setter and getter methods.</div>
</td><td class="summaryTableOwnerCol">IDropInListItemRenderer</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="listData"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">listData</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>listData:<a href="../listClasses/BaseListData.html">BaseListData</a></code>&nbsp;&nbsp;[read-write]<p>
      Implements the <code>listData</code> property
      using setter and getter methods. 
     </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get listData():<a href="../listClasses/BaseListData.html">BaseListData</a></code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set listData(value:<a href="../listClasses/BaseListData.html">BaseListData</a>):void</code>
<br>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
